
    <div class="container-fluid">
        <div class="row body_content">
            <div id='system_manage'>
                <div id='gstreamill_status' class="panel panel-primary">
	            <div class="panel-heading system" data-i18n="system.System Status"></div>
                    <div class="panel-body">
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.CPU Model"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="cpumodel"></p>
                        </div>
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.CPU Count"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="cpucount"></p>
                        </div>
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.Threads per Core"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="threadspercore"></p>
                        </div>
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.Core per Socket"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="corepersocket"></p>
                        </div>
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.Socket Count"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="socketscount"></p>
                        </div>
                        <div class="col-lg-4">
                            <label class="pull-right system"  data-i18n="system.CPU MHz"></label>
                        </div>
                        <div class="col-lg-7">
                            <p id="cpumhz"></p>
                        </div>
                    </div>
                </div>

                <div id='system_danger_zone' class="panel panel-danger">
                    <div class="panel-heading system" data-i18n="system.Danger Zone"></div>
                    <div class="panel-body">
                        <h4 class="system" data-i18n="system.Restart Device"></h4></br>
                        <span class="system" data-i18n="system.Restart OS, all jobs will stoped"></span>
                        <button class='btn btn-danger pull-right system' id='restartdevice' data-i18n="system.Restart Device"></button>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <script type="text/javascript">

    function system () {
        $.get("/stat/system", function (data) {
            $("#cpumodel").html (data.CPU_Model);
            $("#cpucount").html (data.CPU_Count);
            $("#threadspercore").html (data.Threads_per_Core);
            $("#corepersocket").html (data.Core_per_Socket);
            $("#socketscount").html (data.Sockets_Count);
            $("#cpumhz").html (data.CPU_MHz);
        });
    }

    $ (document).ready (function () {

        $.get("/admin/getconf", function (data) {
            if (data.result == "success") {
                Document.GstreamillConf.conf = data.data;
            } else {
                bootbox.alert ("get configure failure: " + data.reason);
                return;
            }

            system ();

            $.i18n.init({
                lng: Document.GstreamillConf.language[Document.GstreamillConf.conf.language]
            }, function(t) {
                $(".nav").i18n ();
                $(".system").i18n ();
            });

            $("#restartdevice").click (function () {
                bootbox.confirm ($.t ("system.Really restart device"), function (confirm) {
                    if (!confirm) {
                        return;
                    }
                });
            });
        });
    });

    </script>
